package test;

import com.wbr.file.mapper.CustomerMapper;
import com.wbr.file.pojo.Customer;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class JunitTestDemo {
   ApplicationContext ac = new ClassPathXmlApplicationContext("classpath:spring/applicationContext-*.xml");

   @Test
    public void testFun(){
       CustomerMapper mapper = ac.getBean(CustomerMapper.class);
       Customer customer = mapper.selectByPrimaryKey(2);
        System.out.println(customer.getCname());
   }
}
